// 头部可去除图片部分
$('.html-top-banner-min-img-close').click(function() {
	$('.html-top-banner').remove();
})
// 专区导航部分输入框选中事件
$('.special-nav-cont-r-c-form-text').focus(function() {
	console.log(1);
	$('.special-nav-cont-r-c-key').hide();

})
$('.special-nav-cont-r-c-form-text').blur(function() {
	console.log(1);
	$('.special-nav-cont-r-c-key').show();

})

// 全屏轮播部分
var mySwiper = new Swiper('.fullbanner', {
	autoplay: {
		pauseOnMouseEnter: true,
		delay: 3000,
	},
	loop: true, // 循环模式选项
	allowTouchMove: false,
	// 如果需要分页器
	pagination: {
		el: '.swiper-pagination',
		clickable: true,
	},

	// 如果需要前进后退按钮
	navigation: {
		nextEl: '.swiper-button-next',
		prevEl: '.swiper-button-prev',
	},
	effect: 'fade',
	fadeEffect: {
		crossFade: true,
	},
	// // 如果需要滚动条
	// scrollbar: {
	//   el: '.swiper-scrollbar',
	// },

})
for (i = 0; i < mySwiper.pagination.bullets.length; i++) {
	mySwiper.pagination.bullets[i].onmouseover = function() {
		this.click();
	}
}
//竖向分类导航栏显示使左箭头隐藏
$('.html-category-c-list-item').hover(function() {
	$('.swiper-button-prev').hide();
}, function() {
	$('.swiper-button-prev').show();
})
// 公告轮播
var mgt=0;
setInterval(function(){
	$('.html-home-channel-list-r-notice-list').stop(true).animate({
		'margin-top':mgt+'px'
	});
	mgt=mgt-43;
	if(mgt<= -215){
		 mgt=0;	 
	}
},3000)


// 精品推荐部分
	var swiper = new Swiper('.recbanner', {
	      slidesPerView: 5,
		  spaceBetween: 30,
		  slidesPerGroup: 5,
	      direction: getDirection(),
	      navigation: {
	        nextEl: '.swiper-button-next',
	        prevEl: '.swiper-button-prev',
	      },
	      on: {
	        resize: function () {
	          swiper.changeDirection(getDirection());
	        }
	      }
	    });
	
	    function getDirection() {
	      var windowWidth = window.innerWidth;
	      var direction = window.innerWidth <= 760 ? 'vertical' : 'horizontal';
	
	      return direction;
	    }
		// 纯图片轮播部分
		var mySwiper = new Swiper('.imgbanner', {
			autoplay: {
				pauseOnMouseEnter: true,
				delay: 2000,
			},
			loop: true, // 循环模式选项
			allowTouchMove: false,
			// 如果需要分页器
			pagination: {
				el: '.swiper-pagination',
				clickable: true,
			},
		
			// 如果需要前进后退按钮
			// navigation: {
			// 	nextEl: '.swiper-button-next',
			// 	prevEl: '.swiper-button-prev',
			// },
			effect: 'fade',
			fadeEffect: {
				crossFade: true,
			},
			// // 如果需要滚动条
			// scrollbar: {
			//   el: '.swiper-scrollbar',
			// },
		
		})
		for (i = 0; i < mySwiper.pagination.bullets.length; i++) {
			mySwiper.pagination.bullets[i].onmouseover = function() {
				this.click();
			}
		}
		
		// 精品推荐部分
			var swiper = new Swiper('.wearvrbanner', {
			      slidesPerView: 6,
				  spaceBetween: 0,
				  slidesPerGroup: 6,
			      direction: getDirection(),
			      navigation: {
			        nextEl: '.swiper-button-next',
			        prevEl: '.swiper-button-prev',
			      },
			      on: {
			        resize: function () {
			          swiper.changeDirection(getDirection());
			        }
			      }
			    });
			
			    function getDirection() {
			      var windowWidth = window.innerWidth;
			      var direction = window.innerWidth <= 760 ? 'vertical' : 'horizontal';
			
			      return direction;
			    }